-
Notifications
You must be signed in to change notification settings - Fork 2
feat: Introduce v3 strict column definitions and enhanced type safety #43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Additionally, more test coverage is present that is shown in the diff. The reason is that i updated the underlying code that was already powering the existing test suites. The specific test case you are asking is called |
lucatume
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the idea and the new method-based API, smaller changes.
borkweb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot and I agree that the change from Field to Column is clearer. Nice work!
I didn't review with a fine-toothed comb, so I won't mark it as Approved, but the direction and structure feels really good.
lucatume
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work.
We've discussed the implementation in a huddle going over the code.
Summary
API Updates for Table definition
Before
After
Note: The method
get_definitionhas changed from protected to public and its part of the interface. The Abstract Table implementation provides a way to translate your Table Schema in adbDeltacompatible SQL definition. You can always still overwrite that method if you choose so and provide your own definition.Note: The history approach, even though currently is NOT being utilized, it allows to move towards a migration system (similar to Laravel's).
The API protects you from some common mistakes with MySQL 5.5. Like multiple timestamp columns defaulting on CURRENT_TIMESTAMP or having a varchar indexed be longer than 191 chars